package com.ysd.lis.controller.bac;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.bac.BacStainingResult;
import com.ysd.lis.request.Params;
import com.ysd.lis.request.qc.QcInstrItemDto;
import com.ysd.lis.service.bac.BacStainingResultService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 染色结果 前端控制器
 * </p>
 *
 * @author cfz
 * @since 2024-03-27
 */
@RestController
@RequestMapping("/api/bac/bac-staining-result")
public class BacStainingResultController extends BaseController {
    @Autowired
    BacStainingResultService bacStainingResultService;

    @ApiOperation("查询")
    @GetMapping("/findBacStainingResultList")
    public Result findBacStainingResultList(BacStainingResult bacStainingResult) {
        return bacStainingResultService.findBacStainingResultList(bacStainingResult);
    }

    @ApiOperation("根据菌株查询染色结果")
    @GetMapping("/findBacStainingResultListByStrain")
    public Result findBacStainingResultListByStrain(Params params) {
        return bacStainingResultService.findBacStainingResultListByStrain(params);
    }
    @ApiOperation("根据菌株查询染色结果")
    @GetMapping("/findBacStainingResultListBySampleNo")
    public Result findBacStainingResultListBySampleNo(BacStainingResult params) {
        return bacStainingResultService.findBacStainingResultListBySampleNo(params);
    }

    @ApiOperation("增加")
    @PostMapping("/addBacStainingResult")
    public Result addBacStainingResult(@RequestBody BacStainingResult bacStainingResult) {
        return bacStainingResultService.addBacStainingResult(bacStainingResult);
    }

    @ApiOperation("删除")
    @PostMapping("/deleteBacStainingResult")
    public Result deleteBacStainingResult(@RequestBody BacStainingResult bacStainingResult) {
        return bacStainingResultService.deleteBacStainingResult(bacStainingResult);
    }

    @ApiOperation("修改")
    @PostMapping("/updateBacStainingResult")
    public Result updateBacStainingResult(@RequestBody BacStainingResult bacStainingResult) {
        return bacStainingResultService.updateBacStainingResult(bacStainingResult);
    }

    @ApiOperation("批量新增")
    @PostMapping("/batchAddBacStainingResult")
    public Result batchAddBacStainingResult(@RequestBody List<BacStainingResult> bacStainingResultList){
        return  bacStainingResultService.batchAddBacStainingResult(bacStainingResultList);
    }
}
